package com.javasm.springboot2.controller;

import com.javasm.springboot2.entity.Student;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author：xls
 * @Version：1.0
 * @Date：2021/11/6-13:04
 * @Since:jdk1.8
 * @Description:
 */
@RestController
public class MyController2 {
    @Resource
   private Student student;

    @GetMapping("springboot2")
    public String init2(){
        System.out.println(student);
        return "666"+student.getUserName()+student.getAge();
    }
}
